package com.hushao.aimi.enumVo;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @description: 商品状态
 * @author: 胡少
 * @create: 2018-06-12 20:42
 **/
public enum ProductRecommendTypeEnum {
    BANNER("0","首页轮播图"),
    FULL("1","首页全行"),
    HALF("2","首页半行"),
    CATEGORY_RECOMMEND("3","分类推荐");

    private final String code;
    private final String comment;

    ProductRecommendTypeEnum(String code, String comment) {
        this.code = code;
        this.comment = comment;
    }

    public String getCode() {
        return code;
    }

    public String getComment() {
        return comment;
    }

    public static  Map<String,String> map(){
        Map<String,String> map=new ConcurrentHashMap<>(4);
        for ( ProductRecommendTypeEnum t: ProductRecommendTypeEnum.values()) {
            map.put(t.getCode(),t.getComment());
        }
        return map;
    }
}
